home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 7906 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: heap fragmentation
  5. Date: Thu, 29 Feb 96 13:53:24 GMT
  6. Organization: none
  7. Message-ID: <825602004snz@genesis.demon.co.uk>
  8. References: <remigy.37.001137F2@uni-duesseldorf.de>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <remigy.37.001137F2@uni-duesseldorf.de>
  15.            remigy@uni-duesseldorf.de "Mathias Remigy" writes:
  16.  
  17. >Hi,
  18. >
  19. >I have written a program that dynamically allocates
  20. >matrices, defined as _double **M_, taking care to free
  21. >them after use.
  22. >
  23. >The functions have been tested, and, as far as I can tell
  24. >as a C novice, they are bug free.
  25. >
  26. >The problem is that the program crashes every once in a while,
  27. >complaining about allocation problem.
  28.  
  29. You need to be more specific. If the program is exiting cleanly after
  30. encountering an allocation failure (e.g. malloc returning a null pointer)
  31. that is one thing, heap corruption is quite another.
  32.  
  33. >Could heap fragmentation
  34. >be the snag, and if it is, what can I do about it ?
  35.  
  36. What sort of system are you running on? Is it possible that you are simply
  37. running out of memory?
  38.  
  39. -- 
  40. -----------------------------------------
  41. Lawrence Kirby | fred@genesis.demon.co.uk
  42. Wilts, England | 70734.126@compuserve.com
  43. -----------------------------------------
  44.